package com.dayu.share.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.dayu.share.mapper.ShareGoodsBrandMapper;
import com.dayu.share.domain.ShareGoodsBrand;
import com.dayu.share.service.IShareGoodsBrandService;

/**
 * 商品品牌Service业务层处理
 * 
 * @author HK
 * @date 2021-04-08
 */
@Service
public class ShareGoodsBrandServiceImpl implements IShareGoodsBrandService 
{
    @Autowired
    private ShareGoodsBrandMapper shareGoodsBrandMapper;

    /**
     * 查询商品品牌
     * 
     * @param brandId 商品品牌ID
     * @return 商品品牌
     */
    @Override
    public ShareGoodsBrand selectShareGoodsBrandById(Long brandId)
    {
        return shareGoodsBrandMapper.selectShareGoodsBrandById(brandId);
    }

    /**
     * 查询商品品牌列表
     * 
     * @param shareGoodsBrand 商品品牌
     * @return 商品品牌
     */
    @Override
    public List<ShareGoodsBrand> selectShareGoodsBrandList(ShareGoodsBrand shareGoodsBrand)
    {
        return shareGoodsBrandMapper.selectShareGoodsBrandList(shareGoodsBrand);
    }

    /**
     * 新增商品品牌
     * 
     * @param shareGoodsBrand 商品品牌
     * @return 结果
     */
    @Override
    public int insertShareGoodsBrand(ShareGoodsBrand shareGoodsBrand)
    {
        return shareGoodsBrandMapper.insertShareGoodsBrand(shareGoodsBrand);
    }

    /**
     * 修改商品品牌
     * 
     * @param shareGoodsBrand 商品品牌
     * @return 结果
     */
    @Override
    public int updateShareGoodsBrand(ShareGoodsBrand shareGoodsBrand)
    {
        return shareGoodsBrandMapper.updateShareGoodsBrand(shareGoodsBrand);
    }

    /**
     * 批量删除商品品牌
     * 
     * @param brandIds 需要删除的商品品牌ID
     * @return 结果
     */
    @Override
    public int deleteShareGoodsBrandByIds(Long[] brandIds)
    {
        return shareGoodsBrandMapper.deleteShareGoodsBrandByIds(brandIds);
    }

    /**
     * 删除商品品牌信息
     * 
     * @param brandId 商品品牌ID
     * @return 结果
     */
    @Override
    public int deleteShareGoodsBrandById(Long brandId)
    {
        return shareGoodsBrandMapper.deleteShareGoodsBrandById(brandId);
    }
}
